package store.lunangangster.engine.impl.agenda;

import store.lunangangster.bpmn.model.FlowElement;
import store.lunangangster.engine.Agenda;
import store.lunangangster.engine.impl.entity.ExecutionEntity;

public interface NodeFlowEngineAgenda extends Agenda {

  /**
   * 向当前Agenda中添加一个{@link DoElementBehaviorOperation}，作用于当前的ExecutionEntity上
   * @param execution         被作用的ExecutionEntity
   * @param previousElement   前一个元素
   */
  void addDoElementBehaviorOperation(ExecutionEntity execution, FlowElement previousElement);

  /**
   * 向当前Agenda中添加一个{@link TakeOutGoingSequenceFlowOperation}，作用于当前的ExecutionEntity上
   * @param execution 被作用的ExecutionEntity
   */
  void addTakeOutGoingSequenceFlowOperation(ExecutionEntity execution);

  /**
   * 向当前Agenda中添加一个{@link EndExecutionOperation}，将当前ExecutionEntity停止
   * @param execution 被作用的ExecutionEntity
   */
  void addEndExecutionOperation(ExecutionEntity execution);


  void addTriggerExecutionOperation(ExecutionEntity execution);
}
